/**
 * @Author       : oak-c
 * @Date         : 2021-01-21 14:04:43
 * @Description  :
 * @LastEditors  : oak-c
 * @LastEditTime : 2021-01-21 14:38:45
 * @FilePath     : /src/controller/global/global.controller.ts
 */

import { Auths } from '@/modules/guard'
import { GlobalConfigService, GlobalGeoService, GlobalHelpService } from '@/service'
import { Body, Controller, Get, Headers, Post, Query, UseGuards } from '@nestjs/common'
import { QueryQuestionDto, ReGeoDto, SetConfigDto, SubmitQuestionDto } from './global.dto'

@Controller('global')
export class GlobalControllers {
    constructor(
        private readonly globalHelpService: GlobalHelpService,
        private readonly globalGeoService: GlobalGeoService,
        private readonly globalConfigService: GlobalConfigService,
    ) {}

    // @Post('queryQuestion')
    // @Auths()
    // public async queryQuestion(@Body() body: QueryQuestionDto) {
    //     return await this.globalHelpService.queryQuestion(body)
    // }
    //
    // @Post('submitQuestion')
    // @Auths()
    // public async submitQuestion(@Body() body: SubmitQuestionDto) {
    //     return await this.globalHelpService.submitQuestion(body)
    // }
    //
    // @Post('regeo')
    // public async regeo(@Body() body: ReGeoDto) {
    //     return await this.globalGeoService.regeo(body.lng, body.lat)
    // }
    //
    // /**
    //  * 配置相关
    //  * @param body
    //  */
    // @Post('queryCompanyConfig')
    // @Auths()
    // public async queryCompanyConfig(@Body() body: any) {
    //     return await this.globalConfigService.queryCompanyConfig(body)
    // }
    // @Post('deleteConfig')
    // @Auths()
    // public async deleteConfig(@Body('id') id: number) {
    //     return await this.globalConfigService.deleteConfig(id)
    // }
    // @Post('setConfig')
    // @Auths()
    // public async setConfig(@Body() body: SetConfigDto) {
    //     return await this.globalConfigService.setConfig(body)
    // }
    @Post('queryVersion')
    public async queryVersion() {
        return await this.globalConfigService.queryVersion()
    }
}
